<!--#INCLUDE FILE="config.asp"-->
<%
if(session("AdminAccessLevel") <> 1) then
	Response.Redirect("admin-login.asp?msg=invalid")
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- DATE PICKER SCRIPT -->
<link type="text/css" href="../css/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.21.custom.min.js"></script>
<script>
	$(function() {
		$( "#arrival1" ).datepicker();
		$( "#departure1" ).datepicker();
		$( "#arrival2" ).datepicker();
		$( "#departure2" ).datepicker();
	});
	</script>
  <!-- END DATE PICKER SCRIPT -->

<script> 
  //$(document).ready(function(){
  //$('.dashboad_wrapper tr:nth-child(odd)').addClass('alternate');
//});
</script>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
    $('#list_table tr:nth-child(2n+1)').addClass('alternate');
});
</script>

  

<title>Admin Panel de Control :: Costa Baja</title>

</head>

<body>

<div id="main_wrapper">
    	<div class="main_wrapper_margin">
        	
            <div class="admin_top_menu">
            <!--#INCLUDE FILE="admin_menu.asp"--> 
           	</div><!-- END admin_top_menu -->
             
			<h1>Panel de Control</h1>
            <div class="clear"></div>
            
            
            
            <div class="dashboad_wrapper">
              
  <table id="list_table" width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr class="titles">
    <td>Pendiente</td>
    <td>Huesped</td>
    <td>Fecha</td>
     <td>&nbsp;</td>
  </tr>
    <%
sqlstring = ""
sqlstring = sqlstring & "SELECT DISTINCT dbo.PendingTasks.TaskName, dbo.Guests.Surname, dbo.Guests.Name, dbo.Guests.GuestID, dbo.Guests.PendingTaskDate "
sqlstring = sqlstring & " FROM dbo.Guests "
sqlstring = sqlstring & " INNER JOIN dbo.PendingTasks ON dbo.Guests.PendingTasksId = dbo.PendingTasks.PendingTaskId "
sqlstring = sqlstring & " WHERE dbo.Guests.PendingTasksId <> 5 "
sqlstring = sqlstring & " ORDER BY dbo.Guests.PendingTaskDate "

set objConnect = server.createObject("ADODB.Connection")   

objConnect.Open conStr

set TblTemp = server.createobject("Adodb.Recordset")
		
		TblTemp.Open Sqlstring, objConnect
		
		Do Until TblTemp.EOF
			guestID = TblTemp("GuestID")
			re_Type = TblTemp("TaskName")
			re_Surname = TblTemp("Surname")
			re_Name = TblTemp("Name")
			re_SchedDate = TblTemp("PendingTaskDate")
			if (re_Type = "Send Approval Notification") then
				PendienteText = "<a href='send-email-reservation.asp?gId="&guestID&"'>"&re_Type&"</a>"
			else
				PendienteText = re_Type	
			End if	
%>
  <tr>
    <td><strong><%=PendienteText %></strong></td>
    <td><%=re_Surname%> <%=re_Name%></td>
    <td><%=FormatDateTime(re_SchedDate,2)%></td>
	 <td><a href="admin-guest-profile-page.asp?gId=<%=guestID%>">Ver Detalles</a></td>
  </tr>
<%
	TblTemp.MoveNext
	Loop

%>
</table>
            
            </div><!-- .dashboad_wrapper -->
                        
    	</div><!-- END .main_wrapper_margin -->
        
	</div><!-- END #main_wrapper -->

         <!-- FOOTER -->
         
         <!--#INCLUDE file="admin_footer.asp"-->
         
         <!-- END FOOTER -->   

</body>
</html>
